package friend

import (
	"encoding/json"
	"gitee.com/ifinder/wechat-ipad-sdk-golang/base"
)

// 通过好友请求
type PassVerifyReq struct {
    Scene int `json:"Scene"`
    V1 string `json:"V1"`
    V2 string `json:"V2"`
    WxId string `json:"Wxid"`

}

type PassVerifyResp struct {
	base.WechatResponse
	Data Data `json:"Data"` //返回群ID
}

func (this *PassVerifyResp) Success() bool {
	if this.Code==base.Code_0 && this.Data.BaseResponse.Ret==base.Code_0{
		return true
	}
	return false
}

type Data struct {

	BaseResponse base.BaseResponse `json:"BaseResponse"`
	Username string `json:"Username"`
}


func (this *PassVerifyResp)  FromJson(data []byte) error {
	return json.Unmarshal(data,this)
}
